﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLKDS.DTO;

namespace QLKDS.DAL
{
    public class SupplierReportManager
    {
  
        public IList<SupplierReport> ListSupplier()
        {
            using (var db = new QLKDSDataContext())
            {
                var querySupplier = from d in db.Suppliers
                                    where d.Status.Equals(1)
                                    select new SupplierReport { Id = d.Id, Code = d.Code, Name = d.Name, Address = d.Address,TaxCode = d.TaxCode, Contactor=d.Contactor,ContactorMobile=d.ContactorMobile };
                return querySupplier.OrderBy(d => d.Code).ToList();
            }
        }

    }
}
